using System;
using System.Collections.Generic;

namespace test8_h1.Models
{
    public class School
    {   
        public int Id { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public virtual ICollection<Class> Classes { get; set; }

        public School()
        {
            Classes = new List<Class>();
        }
    }

    public class Class
    {   
        public int Id { get; set; }
        public string Name { get; set; }
        public int Grade { get; set; }
        public int SchoolId { get; set; }
        public virtual School School { get; set; }
        public virtual ICollection<Student> Students { get; set; }

        public Class()
        {
            Students = new List<Student>();
        }
    }

    public class Student
    {   
        public int Id { get; set; }
        public string Name { get; set; }
        public int Age { get; set; }
        public string Gender { get; set; }
        public int ClassId { get; set; }
        public virtual Class Class { get; set; }
    }

    public class Log
    {   
        public int Id { get; set; }
        public string Operation { get; set; }
        public string Details { get; set; }
        public DateTime Timestamp { get; set; }

        public Log()
        {   
            Timestamp = DateTime.Now;
        }
    }
}